#coding=utf-8
from __future__ import unicode_literals
from django.shortcuts import render
import json

# Create your views here.

def home(request):
    #string = u"我在自强学堂学习Django，用它来建网站"
    #return render(request, "home.html", {'string': string})

    #TutoriaList = ["HTML", "CSS", "jQuery", "Python", "django"]
    #return render(request, "home.html", {"TutoriaList": TutoriaList})

    #info_dict = {'site': u'自强学堂', 'content': u'各种IT技术教程'}
    #return render(request, 'home.html', {'info_dict': info_dict})

    #List = map(str, range(100))# 一个长度为100的 List
    #return render(request, 'home.html', {'List': List})

    List = ['自强学堂', '渲染Json到模板']
    Dict = {'site': '自强学堂', 'author': '涂伟忠'}
    return render(request, 'home.html', {
            'List': json.dumps(List),
            'Dict': json.dumps(Dict)
        })
